package com.dyypdadmin.service.impl;

import com.dyypdadmin.dao.AppointmentRecordsDao;
import com.dyypdadmin.pojo.AppointmentRecords;
import com.dyypdadmin.service.AppointmentRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class AppointmentRecordsServiceImpl implements AppointmentRecordsService {

    @Autowired
    private AppointmentRecordsDao appointmentRecordsDao;

    @Override
    public List<AppointmentRecords> getAllAppointmentRecords() {
        return appointmentRecordsDao.getAllAppointmentRecords();
    }

    @Override
    public AppointmentRecords getAppointmentRecordsById(Integer appointment_pkid) {
        return appointmentRecordsDao.getAppointmentRecordsById(appointment_pkid);
    }

    @Override
    public int insertAppointmentRecords(Integer user_pkid, Integer pet_id, Integer project_id, Integer doctor_pkid, Date appointment_time,Integer is_medical) {
        return appointmentRecordsDao.insertAppointmentRecords(user_pkid, pet_id, project_id, doctor_pkid, appointment_time,is_medical);
    }

    @Override
    public int updateAppointmentRecords(AppointmentRecords appointmentRecords) {
        return appointmentRecordsDao.updateAppointmentRecords(appointmentRecords);
    }

    @Override
    public int deleteAppointmentRecords(Integer appointment_pkid) {
        return appointmentRecordsDao.deleteAppointmentRecords(appointment_pkid);
    }

    @Override
    public int updateAppointment_status(Integer appointment_pkid, String status) {
        return appointmentRecordsDao.updateAppointment_status(appointment_pkid,status);
    }

    @Override
    public int getAppointmentCounts() {
        return appointmentRecordsDao.getAppointmentCounts();
    }
}
